#include<stdio.h>
#define a 1500
int main()
{
	int n;
	scanf("%d",&n);
	double m;
	if(n<=10000)
	{
		m=n*0.05+a;
		printf("%.2f",m);
	}
	else if(n>10000&&n<=50000)
	{
		m=500+a+(n-10000)*0.03;
		printf("%.2f",m);
	}
	else if(n>50000)
	{
		m=500+a+40000*0.03+(n-50000)*0.02;
		printf("%.2f",m);
	}
	return 0;
}
